/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package arraylistdependentqueue;

/**
 *
 * @author mweya
 */
import arraylistdependentqueue.Queue;
public class Arraylistdependentqueue {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Queue queue = new Queue<>();
        queue.add("First added");
        if (queue.offer("Second added")) {
            //
        } else {
            System.err.println("Couldn't add the second element");
        }
        queue.add("Third added");
        System.out.println(queue.peek());
        System.out.println(queue.poll());
        try {
            System.out.println(queue.remove());
        } catch (Exception e) {
            e.toString();
        }
        System.out.println(queue.toString());
    }
    
}